Function: trim(String) Description: Removes leading and traling whitespace characters from a string. Returns: String. Note: The trim() function does not support chaining. Example: // Remove whitespace characters from the beginning and end of a string. var newString = $A.trim(oldString);